home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.19970626-19970929 / 000103_news@newsmaster….columbia.edu _Thu Jul 24 11:58:56 1997.msg < prev    next >
Internet Message Format  |  2020-01-01  |  3KB

  1. Return-Path: <news@newsmaster.cc.columbia.edu>
  2. Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.35.30])
  3.     by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id LAA18579
  4.     for <kermit.misc@watsun.cc.columbia.edu>; Thu, 24 Jul 1997 11:58:55 -0400 (EDT)
  5. Received: (from news@localhost)
  6.     by newsmaster.cc.columbia.edu (8.8.5/8.8.5) id LAA12460
  7.     for kermit.misc@watsun; Thu, 24 Jul 1997 11:58:53 -0400 (EDT)
  8. Path: news.columbia.edu!watsun.cc.columbia.edu!fdc
  9. From: fdc@watsun.cc.columbia.edu (Frank da Cruz)
  10. Newsgroups: comp.protocols.kermit.misc
  11. Subject: Re: ftp script
  12. Date: 24 Jul 1997 15:58:50 GMT
  13. Organization: Columbia University
  14. Lines: 61
  15. Message-ID: <5r7u3q$510$1@apakabar.cc.columbia.edu>
  16. References: <5r7qha$c40$1@trotsky.cig.mot.com>
  17. NNTP-Posting-Host: watsun.cc.columbia.edu
  18. Xref: news.columbia.edu comp.protocols.kermit.misc:7381
  19.  
  20. In article <5r7qha$c40$1@trotsky.cig.mot.com>,
  21. Robert H. Bradshaw <bradshaw@pcs.mot.com> wrote:
  22. : I am trying to use C-kermit's scripting feature to automate an ftp session.
  23. : QUESTION: Is this a could idea? I know there are other tools that can do
  24. : this like expect, perl, etc. These tools may be better suited for this type
  25. : of scripting but I want to minimize the number of tools that are used for
  26. : this project and I am already using kermit.
  27. : I need to make a hop through a firewall and then to the ftp server. The 
  28. : problem I am having is how to actually connect to the ftp session.
  29. : I have tried
  30. :    C-Kermit> ftp firewall
  31.  
  32. : but this just starts an ftp session and does not allow me to use the
  33. : input/output functions.
  34. Right.
  35.  
  36. : I have also tried
  37. :    C-Kermit> set host firewall ftp
  38. :
  39. : This doesn't seem to establish a correct ftp session. I receive messages
  40. : like: 500 '': command not understood.
  41. :
  42. Right -- if you did this, you would need to write a script to execute the 
  43. FTP protocol, but that is not possible because it would demand two TCP
  44. connections -- one for data and one for control -- and Kermit presently only
  45. supports one connection at a time.
  46.  
  47. At some point we expect to build ftp protocol into Kermit, but we haven't
  48. done it yet.
  49.  
  50. : I want to be able to do something like...
  51. : clear input
  52. : set host firewall ftp            ; setup connection
  53. : ; may have to login here
  54. : input 5 firewall>
  55. : output {ftp xxx.yyy.zzz.aaa\13}  ; send the ftp command
  56. : input 5 login:                   ; login 
  57. : output myname\13
  58. : input 9 assword:
  59. : output mypassword\13
  60. : input 5 ftp>                     ; wait for ftp prompt
  61. : output bin\13                    ; set binary mode
  62. : input 20 ftp>                    ; wait for ftp prompt
  63. : output {get some_binary_file\13} ; transfer the file
  64. : input  200 ftp>
  65. : output bye\13                    ; exit ftp
  66. : output quit\13                   ; exit firewall
  67. This should work just fine if you change:
  68.  
  69.    set host firewall ftp           ; setup connection
  70.  
  71. to:
  72.  
  73.    set host firewall               ; setup connection
  74.  
  75. - Frank